<?php
/**
 *
 *
 * @author Gian Giacomo Ermacora - giangiacomo.ermacora@gmail.com - 2008
 * @copyright
 *
 * @name
 * @version
 * @package
 */
Zend_Loader::loadClass('Zend_Debug');

class MiniCMS_Debug {

    public static function dump( $var, $label=null,  $echo=true ){
        if ( ! $var ) {
            //throw new Exception( 'Debug: No debug variable given in Synthesis_Debug class!' );
            echo 'Debug: No debug variable given in Synthesis_Debug class!';
        }
        $content =   '<hr />
        		<table>
        			<tr>
        				<td><h3>Debug - value given: '.gettype($var).'</h3></td>
        			</tr>
        			<tr>
        				<td align="left"><pre>';
        $content .=      Zend_Debug::dump( $var, $label, false );
        $content .=       '</pre></td>
        			</tr>
        		</table>
        		<hr />';
        if ($echo){
            echo $content;
        }else {
            return $content;
        }
    }

}
 ?>